$file1 = "probeset_gene_position.txt";
open(BUFF,$file1);
$file2 = "final__taqman_normalized.txt";
$line = <BUFF>;
open(BUFF2,$file2 );
open(WRBUFF,">affyprobeset_taqman_normalized.txt");
$line = <BUFF2>;
print WRBUFF $line;
while($line = <BUFF>)
{
	chomp $line;
  	@array = split("\t",$line);	
	if($hash{$array[1]} eq "")
	{
		$hash{$array[1]} = 1;
		$hash1{$array[1]} = $array[0];
	}
	else
	{
		$hash1{$array[1]} = $hash1{$array[1]}."\t".$array[0];
	}
} 
while($line = <BUFF2>)
{
	chomp $line;
	@array = split("\t",$line);
	if($hash1{$array[0]} != "")
	{
		@array1 = split("\t",$hash1{$array[0]});
		for($i=0;$i<@array1;$i++)
		{
			@array = split("\t",$line);
			shift(@array);
			unshift(@array,$array1[$i]);	
			$line = join("\t",@array);
			print WRBUFF $line."\n";
		}
	}
}
